<script setup>
// import { provide, ref } from 'vue';
// import utils from '@/common/js/utils/index.js';

// 同步获取环境类型
// const type = utils.getEnvironmentType();
// const environmentType = ref(type);

// 在 setup 阶段提供环境类型
// provide('environmentType', environmentType);

const getRealScreenHeight = () => {
  const systemInfo = uni.getSystemInfoSync();
  // 获取实际设备信息而不是当前窗口高度
  return systemInfo.safeArea ? systemInfo.safeArea.height : systemInfo.windowHeight;
};
/*
const windowInfo = uni.getWindowInfo();
const screenHeight = windowInfo.screenHeight; // 屏幕高度
const windowHeight = windowInfo.windowHeight; // 可用窗口高度
*/

onMounted(() => {
  console.log('屏幕高度是：', getRealScreenHeight());
  provide('RealScreenHeight', getRealScreenHeight());
});
</script>

<template>
  <!-- <RouterView /> -->
</template>

<style lang="scss">
// 设置整个项目的背景色
page {
  background-color: #f5f5f5;
}
</style>
